import React from 'react'
import { useLocation } from 'react-router-dom'

export default function Detail2() {
    const { state } = useLocation();
    console.log(useLocation(), state);
    const { id, title, content } = state;
    return (
        <div>Detail2函数式组件
              <ul>
                <li>id：{id}</li>
                <li>title：{title}</li>
                <li>content:{content}</li>
            </ul>
        </div>
    )
}
